<template>
  <el-tooltip content="用户未登录，点击跳转到登录界面" effect="light"
              :disabled="!!Object.keys(this.currentUser).length">
    <slot></slot>
  </el-tooltip>
</template>

<script>
import { mapState } from 'vuex';

export default {
  name: 'RequireSignInTooltip', // 简单封装一个提示需要登录的组件
  computed: {
    ...mapState(['currentUser']),
  },
};
</script>

<style></style>
